<%@page import="cn.edu.ujn.finallab.dao.Customer"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>添加客房信息</title>
		<link href="<c:url value="/css/indexOfAdmin.css"/>" rel="stylesheet" type="text/css" />
	</head>
	<script type="text/javascript">
		function judge() {
			var price = Number(document.getElementById("price1").value);
			var nowDate = new Date();
			if (isNaN(price)) {
				alert("客房价格请输入数字！");
				return false;
			} else
				return true;
		}
	</script>
	<body>
		<div class="whole">
			<div class="front"></div>
			<div class="footer"></div>
			<div class="title">填&nbsp;加&nbsp;新&nbsp;的&nbsp;客&nbsp;房</div>
			<div class="modifyInput">
				<div>
					<form action="<c:url value="/addroom?currentPage=${lastPage}"/>" method="post" onsubmit="return judge()">
						客房编号：<input type="text" value="" placeholder="请输入客房编号" name="number" required="required"> <br> <br>
						客房类型：
						<select name="type" style="width: 200px" required="required">
							<option value="单人间">- 单人间 -</option>
							<option value="双人间">- 双人间 -</option>
							<option value="三人间">- 三人间 -</option>
							<option value="四人间">- 四人间 -</option>
						</select> <br> <br>
						客房价格：<input type="text" id = "price1" value="" placeholder="请输入客房价格" name="price" required="required"> <br> <br>
						客房描述：<textarea rows="4" cols="28" name="decription" placeholder="请添加客房描述，有一个好的介绍才有更多的人来入住哦(#^.^#)" required="required"></textarea>
						<br> <br>
						<input type="submit" value="确认添加" style="width: 200px; height: 40px; border: 2px; background-color: red" class="submit"
						 onclick="return confirm('确定添加？')">
						<a href="/finallab/allRoom?currentPage=${currentPage}" onclick="return confirm('确定取消添加？')">取消添加</a>
					</form>
				</div>
				<div style="color: red; margin-top: 30px">${msg}</div>
			</div>
		</div>
	</body>
</html>
